﻿<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="Zen4SyncDashboard.MainWindow"
        Title="Zen4Sync Dashboard" WindowState="Maximized"
        Style="{StaticResource BaseStyle}"
        Background="{DynamicResource ApplicationBackgroundBrush}"
        xmlns:view="clr-namespace:Zen4SyncDashboard.View"
        xmlns:viewmodel="clr-namespace:Zen4SyncDashboard.ViewModel">
    <Window.Resources>
        <Storyboard x:Key="MainContentFadeIn">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Ctrl_MainContent">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="MainContentFadeOut">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Ctrl_MainContent">
                <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
    </Window.Resources>
    <DockPanel>
        <Menu DockPanel.Dock="Top" VerticalAlignment="Top" HorizontalAlignment="Stretch" Style="{StaticResource MainMenuStyle}">
            <MenuItem Header="_File">
                <MenuItem Header="_Exit" Command="{Binding ExitApplicationCommand}"/>
            </MenuItem>
            <MenuItem Header="_View">
                <MenuItem Header="_Test Sessions">
                    <MenuItem Header="_All Test Sessions" Command="{Binding NavigateAllTestSessionsCommand}"/>
                    <MenuItem Header="_Create New Test Session" Command="{Binding NavigateCreateTestSessionCommand}"/>
                </MenuItem>
                <MenuItem Header="Test _Scenarios">
                    <MenuItem Header="_All Test Scenarios" Command="{Binding NavigateAllTestScenariosCommand}"/>
                    <MenuItem Header="_Create Test Scenario" Command="{Binding NavigateCreateTestScenarioCommand}"/>
                </MenuItem>
                <MenuItem Header="_Activities">
                    <MenuItem Header="Merge _Synchronizations" Command="{Binding NavigateMergeSyncCommand}"/>
                </MenuItem>
                <MenuItem Header="_Contexts">
                    <MenuItem Header="Merge _Synchronization Contexts" Command="{Binding NavigateMergeSyncContextCommand}"/>
                </MenuItem>
                <MenuItem Header="Test Se_rvers">
                    <MenuItem Header="_All Test Servers" Command="{Binding NavigateTestServerCommand}"/>
                </MenuItem>
            </MenuItem>
        </Menu>
        <!--<ToolBarTray DockPanel.Dock="Top">
            <ToolBar IsOverflowOpen="True" Background="{StaticResource ApplicationBackgroundBrush}">
                <Button ToolTip="Merge Synchronization Activities" Content="{StaticResource Icon_MergeSynchronizationView}"
                        HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                        Command="{Binding NavigateMergeSyncCommand}"/>
            </ToolBar>
            <ToolBar IsOverflowOpen="True" Background="{StaticResource ApplicationBackgroundBrush}">
                <Button ToolTip="Test Scenarios" Content="{StaticResource Icon_TestScenarioView}"
                        HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                        Command="{Binding NavigateTestScenarioCommand}"/>
            </ToolBar>
            <ToolBar IsOverflowOpen="True" Background="{StaticResource ApplicationBackgroundBrush}">
                <Button ToolTip="Merge Synchronization Contexts" Content="MS Contexts"
                        HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                        Command="{Binding NavigateMergeSyncContextCommand}"/>
            </ToolBar>
        </ToolBarTray>-->
        <StatusBar DockPanel.Dock="Bottom">
            <StatusBarItem Content="{Binding Path=WorkStatus}"/>
        </StatusBar>
        <ContentControl Name="Ctrl_MainContent"
                        VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch"
                        Margin="10,0"
                        Background="{DynamicResource ApplicationBackgroundBrush}"
                        Content="{Binding ActiveViewModel}" />
    </DockPanel>
</Window>
